This invention relates to the fields of computer systems and data management. More particularly, a system and methods are provided for automatically invalidating a cached data item.
In many computing environments, data desired by users or clients may be cached in order to provide faster response to the users' data requests. Thus, a typical environment may include users or clients operating browsers or other user interfaces to request data stored on a database or web server, and a cache system interposed between the users and the data server. A subset of the data stored on the data server is cached in the cache system. In this environment, data requests may be intercepted or routed to the cache system. If a user's desired data is stored in the cache, the request may be satisfied from there, thereby avoiding the time and expense of passing the request to the data server and waiting for the desired data to be returned.
Data that is cached may be updated or replaced as the original or master version stored on the server is modified or replaced. Typically, when data on the server is changed (e.g., by a user), the server invalidates the corresponding data on the cache system by sending the cache system an invalidation message identifying the obsolete data. Thus, even though the cache system may have received the user's data change, and passed it to the server, an additional communication must be sent back to the cache system from the server in order to invalidate the data. This was necessary because, traditionally, only the data server was configured with the requisite intelligence and capability to apply the side effects (e.g., data invalidation) of user activities. Until the server's invalidation message is received and applied, there is the possibility that invalid data may be served from the cache system.